package Huihu.src.刷题;

import java.text.DecimalFormat;
import java.util.Scanner;

public class 求角的度数 {
    public static void main(String[] args) {
        /*
        A(x1,y1)
        B(x2,y2)
        C(x3,y3)
        AB=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)
        AC=(x1-x3)*(x1-x3)+(y1-y3)*(y1-y3)
        BC=(x2-x3)*(x2-x3)+(y2-y3)*(y2-y3)
         */
        Scanner scanner=new Scanner(System.in);
        int x1=scanner.nextInt();
        int y1=scanner.nextInt();
        int x2=scanner.nextInt();
        int y2=scanner.nextInt();
        int x3=scanner.nextInt();
        int y3=scanner.nextInt();
        double a,b,c;
        a = Math.sqrt(Math.pow((x1-x2),2)+Math.pow((y1-y2),2));//Math.sqrt()平方根函数
        b = Math.sqrt(Math.pow((x1-x3),2)+Math.pow((y1-y3),2));
        c = Math.sqrt(Math.pow((x3-x2),2)+Math.pow((y3-y2),2));

        double cosa,cosb,cosc;
        cosa = (b*b+c*c-a*a)/(2*b*c);//余弦定理
        cosb = (a*a+c*c-b*b)/(2*a*c);
        cosc = (a*a+b*b-c*c)/(2*a*b);
        DecimalFormat df=new DecimalFormat("0.00");
        System.out.println("a角度:"+df.format(Math.toDegrees(Math.acos(cosa))));//Math.toDegrees（）将参数转化为角度
        System.out.println("b角度:"+df.format(Math.toDegrees(Math.acos(cosb))));
        System.out.println("c角度:"+df.format(Math.toDegrees(Math.acos(cosc))));
    }
}
